<div class="col-xs-12 p0" ng-controller="userBugCtrl" ng-init="queryBugList()" >
    <div class="col-xs-12 main-nav">
        <div class="btn-group btn-group-sm r3 fl mr10">
            <a type="button" class="btn btn-default" onclick="history.back(-1);"><i
                    class="iconfont mt-3">&#xe697;&nbsp;</i>后退</a>

            <a type="button" class="btn btn-default" id="refresh" ng-click="queryBugList(list.page.currentPage)"><i
                    class="iconfont mt-3">&#xe6aa;&nbsp;</i>刷新</a>

            <a ng-class="{true: 'btn btn-default btn-sm', false:'btn btn-default btn-sm disabled'}[isProjectUser('addBug')]"
               ng-href="#/user/bug/edit?id=NULL&type=BUG&dataType=bug&menu_b=menu_bug&projectName={{$stateParams.projectName}}&projectId={{$stateParams.projectId}}&moduleId={{$stateParams.moduleId}}&menu_a=menu-project">
                <i class="iconfont mt-3">&#xe604;&nbsp;新增缺陷</i>
            </a>
        </div>

        <input type="text" autocomplete="off" class="form-control input-sm dis-in-blo w100 fl mr10" placeholder="缺陷名称"
               ng-model="$stateParams.name">

        <button type="button" class="btn btn-adorn btn-sm fl mr10" ng-click="queryBugList(1);">
            <i class="iconfont mt-3">&#xe6ac;</i>&nbsp;查询
        </button>
    </div>

    <div class="col-xs-12 p20 mt60">
        <!-- 查询条件 -->
        <div class="BGFFF p10 bug-filter h45">
            <div ng-class="{true:'main-bg-opacity-1',false:'BGEEE'}[$stateParams.creator != null]">
                <span ng-click="setFilter('creator', sessionAdminId)">我创建的 </span>
                <i class="iconfont" ng-click="setFilter('creator', null)" ng-if="$stateParams.creator != null">&#xe69a;</i>
            </div>

            <div ng-class="{true:'main-bg-opacity-1',false:'BGEEE'}[$stateParams.executor != null]">
                <span ng-click="setFilter('executor', sessionAdminId)">我解决的 </span>
                <i class="iconfont" ng-click="setFilter('executor', null)" ng-if="$stateParams.executor != null">&#xe69a;</i>
            </div>

            <div ng-class="{true:'main-bg-opacity-1',false:'BGEEE'}[$stateParams.tracer != null]">
                <span ng-click="setFilter('tracer', sessionAdminId)">抄送给我的 </span>
                <i class="iconfont" ng-click="setFilter('tracer', null)" ng-if="$stateParams.tracer != null">&#xe69a;</i>
            </div>

            <div ng-class="{true:'main-bg-opacity-1',false:'BGEEE'}[$stateParams.tester != null]">
                <span ng-click="setFilter('tester', sessionAdminId)">我测试的 </span>
                <i class="iconfont" ng-click="setFilter('tester', null)" ng-if="$stateParams.tester != null">&#xe69a;</i>
            </div>
        </div>
        <div class="BGFFF min-h500 mt10">
            <div ng-if="bugVOList.length == 0" class="p20 pt50 tc">
                <i class="iconfont f20 mt-5 mr10">&#xe69c;</i>没有查到缺陷
            </div>
            <div ng-repeat="item in bugVOList" class="bb1 p10 f14">
                <div>
                    <span class="mr10 mt-3 f12 btn btn-xs bug-status-{{item.status}}" crap-id="{{item.id}}"
                          id="status-{{item.id}}" crap-def="{{item.status}}" crap-class-pre="bug-status"
                          onclick="loadBugPick(this, event,120,290,'BUG_STATUS')">
                        <span id="status-{{item.id}}-text">{{item.statusStr}}</span>
                        <i class="iconfont">&#xe614;</i>
                    </span>

                    <a ng-href="#/user/bug/edit?id={{item.id}}&type=BUG&dataType=bug&menu_b=menu_bug&projectName={{$stateParams.projectName}}&projectId={{$stateParams.projectId}}&moduleId={{$stateParams.moduleId}}&menu_a=menu-project&pageName=缺陷详情">
                        {{item.name| cut:true:60:' ...'}}
                    </a>
                    <div class="fr f12">
                        <button class="mr0 btn btn-xs bug-default">
                            {{item.creatorStr}}
                        </button>
                        →
                        <button class="mr10 btn btn-xs bug-default" crap-id="{{item.id}}"
                                id="executor-{{item.id}}" crap-def="{{item.executor}}" crap-pick-param="{{item.projectId}}"
                                onclick="loadBugPick(this, event,120,200,'EXECUTOR')">
                            <span id="executor-{{item.id}}-text">{{item.executorStr}}</span>
                            <i class="iconfont CCCC">&#xe614;</i>
                        </button>

                        <span ng-bind="item.createTimeStr" class="C999 pl10"></span>
                    </div>
                </div>

                <div class="mt10 f12">
                    <button class="mr10 btn btn-xs bug-priority-{{item.priority}}" crap-id="{{item.id}}"
                            id="priority-{{item.id}}" crap-def="{{item.priority}}" crap-class-pre="bug-priority"
                            onclick="loadBugPick(this, event,90,150,'PRIORITY')">
                        <i class="iconfont">&#xe80c;</i>
                        <span id="priority-{{item.id}}-text">{{item.priorityStr}}</span>
                        <i class="iconfont CCCC">&#xe614;</i>
                    </button>

                    <button class="mr10 btn btn-xs bug-severity-{{item.severity}}" crap-id="{{item.id}}"
                            id="severity-{{item.id}}" crap-def="{{item.severity}}" crap-class-pre="bug-severity"
                            onclick="loadBugPick(this, event,100,150,'SEVERITY')">
                        <i class="iconfont">&#xe82c;</i>
                        <span id="severity-{{item.id}}-text">{{item.severityStr}}</span>
                        <i class="iconfont CCCC">&#xe614;</i>
                    </button>

                    <button class="mr10 btn btn-xs bug-default"
                            id="type-{{item.id}}" crap-def="{{item.type}}" crap-id="{{item.id}}"
                            onclick="loadBugPick(this, event,120,180,'BUG_TYPE')">
                        <i class="iconfont mr5">&#xe6b4;</i>
                        <span id="type-{{item.id}}-text">{{item.typeStr}}</span>
                        <i class="iconfont CCCC">&#xe614;</i>
                    </button>

                    <button class="mr10 btn btn-xs bug-default" crap-id="{{item.id}}"
                            id="tracer-{{item.id}}" crap-def="{{item.tracer}}" crap-pick-param="{{item.projectId}}"
                            onclick="loadBugPick(this, event,120,180,'TRACER')">
                        <i class="iconfont mr5">&#xe666;</i>
                        <span id="tracer-{{item.id}}-text">{{item.tracerStr}}</span>
                        <i class="iconfont CCCC">&#xe614;</i>
                    </button>

                    <span class="CAAA mr10" ng-bind="item.updateTimeStr + ' 更新'"></span>
                </div>
            </div>

            <div class="mt20 mr10" ui-view="page" ng-init="callBackMethod = 'queryBugList'; modelKey='bugVOList'"></div>
        </div>
    </div>
</div>
<div class="cb"></div>

